String

[String] - Extended String functions.


Description:

FUNCTION mid$(String$,From,Len)

Parameters:

String$: Source String from which we extract

From: Count of character where to start

Len: Length of extracted String in chars

Returns:

Extracted String

 

FUNCTION left$(String$,Len)

Parameters:

String$: Source String from which we extract

Len: Length of extracted String in chars. E.g. if you select 17, so first 17 chars of a string are returned

Returns:

Extracted String

FUNCTION right$(String$,Len)

Parameters:

String$: Source String from which we extract

Len: Length of extracted String in chars. E.g. if you select 17, so last 17 chars of a string are returned

Returns:

Extracted String

FUNCTION strpos2(String1$,String2$)

Parameters (must be variables, not Expressions!):

String1$: String to search

String2$: The String to find inside String1$

Returns:

Position of String2$ inside the String1$.

Notes:

If the String2$ is not found inside String1$, it returns a value greater than size of String1$.

 

FUNCTION strpos(String1$,String2$)

Parameters:

String1$: String to search

String2$: The String to find inside String1$

Returns:

Position of String2$ inside the String1$.

Notes:

If the String2$ is not found inside String1$, it returns a value greater than size of String1$.

 

FUNCTION inStr(String1$,String2$)

Parameters:

String1$: String to search

String2$: The String to find inside String1$

Returns:

If String2$ is not found inside the String1$, returns 0, or any other value if found.

Notes:

If the String2$ is not found inside String1$, it returns a value greater than size of String1$.

 

SUB ucase2$(String$)

Parameters:

String1$: String to convert to upper case, the result will be written in the same variable.

Returns:

Nothing

 

FUNCTION ucase(String$)

Parameters:

String1$: String to convert to upper case

Returns:

String converted to upper case

 

SUB lcase2$(String$)

Parameters:

String1$: String to convert to lower case, the result will be written in the same variable.

Returns:

Nothing

 

FUNCTION lcase(String$)

Parameters:

String1$: String to convert to lower case

Returns:

String converted to lower case

 


#Include <string.bas>


Supported Plattforms:

ZX Spectrum